package com.lhy.sparkdemo.controller;

import com.lhy.sparkdemo.service.SparkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

// 在Controller中调用
@RestController
public class SparkController {
    @Autowired
    private SparkService sparkService;

    @GetMapping("/process-sales")
    public String processData() {
        sparkService.processSalesData();
        return "数据处理完成";
    }
}